package com.tuanzi.loan.web.lazy.settlement;

import com.tuanzi.loan.business.service.settlement.CompanyInfoService;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.settlement.CompanyInfoSearchRequest;
import com.tuanzi.loan.vo.response.settlement.CompanyInfoSearchResponse;
import com.tuanzi.loan.web.bean.CurrentUserBean;
import com.tuanzi.loan.web.lazy.LazyDataSessionModel;
import org.springframework.data.domain.Page;

/**
 * @author caiwanlin
 * @create 2018-01-25 20:17
 */
public class CompanyInfoLazyDataModel extends LazyDataSessionModel<CompanyInfoSearchRequest,CompanyInfoSearchResponse> {
    private CompanyInfoService companyInfoService;
    public CompanyInfoLazyDataModel(CompanyInfoSearchRequest companyInfoSearchRequest, CurrentUserBean session, CompanyInfoService companyInfoService) {
        super(companyInfoSearchRequest, session);
        this.companyInfoService = companyInfoService;
    }
    @Override
    protected Page<CompanyInfoSearchResponse> doLoad0(PageSearcher<CompanyInfoSearchRequest> pageSearcher) {
        return companyInfoService.list(pageSearcher);
    }
}
